#!/usr/bin/perl -w
#
use strict;
use ConfigRCS;
use File::Copy;

my $bindir = "/usr/bin";
my $rcsdir = "/usr/ssn/etc/netops/RCS";
my $workdir = "/usr/ssn/etc/netops";
my $now = localtime();

my $rcs = ConfigRCS->new($bindir, $rcsdir, $workdir);

my $file = "cust-vpn01.l42.silverspringnet.com.cfg";
my $new_file = "/tftpboot/cust-vpn01.l42.silverspringnet.com.cfg";

chdir($workdir);
$rcs->checkout($file);
move($new_file, $file);

my @changed = $rcs->diff();
print "changed: @changed!\n";

my $message = sprintf("checkin at %s", $now);
$rcs->checkin($file, $message);
